<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        div{
            width: 300px;
            height: 300px;
            padding: 10px;
            margin: 0 auto;
            border: 2px solid red;
        }
        a{
            width: 100px;
            height: 100px;
            text-decoration: none;
            line-height: 100px;
            text-align: center;
            display: block;
            color: white;
            background-color: #f186a9;
        }
        a:hover{
            background: #21D4FD;
        }
        #a2{
            position: relative;
            right: -200px;
            top: -100px;
        }
        #a4{
            position: relative;
            right: -200px;
            top: -100px;
        }
        #a5 {
            position: relative;
            right: -100px;
            top: -300px;
        }
    </style>
</head>
<body>

<div>
    <a href="#" id="a1">方块1</a>
    <a href="#" id="a2">方块2</a>
    <a href="#" id="a3">方块3</a>
    <a href="#" id="a4">方块4</a>
    <a href="#" id="a5">方块5</a>
</div>

</body>
</html>